package com.cyj.comment.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 *
 * </p>
 *
 * @author chixiaowai
 * @since 2023-04-04
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("tb_blog")
@ApiModel(value="Blog对象", description="")
public class Blog implements Serializable {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "商户id")
    @TableField("shop_id")
    private Long shopId;

    @ApiModelProperty(value = "用户id")
    @TableField("user_id")
    private Long userId;

    @ApiModelProperty(value = "标题")
    @TableField("title")
    private String title;

    @ApiModelProperty(value = "探店的照片，最多9张，多张以','隔开")
    @TableField("images")
    private String images;

    @ApiModelProperty(value = "探店的文字描述")
    @TableField("content")
    private String content;

    @ApiModelProperty(value = "点赞数量")
    @TableField("liked")
    private Integer liked;

    @ApiModelProperty(value = "评论数量")
    @TableField("comments")
    private Integer comments;

    @ApiModelProperty(value = "创建时间")
    @TableField("create_time")
    private Date createTime;

    @ApiModelProperty(value = "更新时间")
    @TableField("update_time")
    private Date updateTime;

    /**
     * 用户姓名
     */
    @TableField(exist = false)
    private String name;
    /**
     * 用户图标
     */
    @TableField(exist = false)
    private String icon;
    /**
     * 是否点赞
     */
    @TableField(exist = false)
    private Boolean isLike;
}
